<%@ Page Language="C#" MasterPageFile="~/Board.Master" AutoEventWireup="true" CodeBehind="ViewTopic.aspx.cs" Inherits="UserInterface.ViewTopic" %>
<%@ Register TagPrefix="cc" TagName="Pager" Src="~/UserControls/Pager.ascx" %>
<%@ Register TagPrefix="cc" TagName="MessageView" Src="~/UserControls/MessageView.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    
    <cc:Pager ID="TopPager" runat="server" />
    
    <div id="quick-search">
          Quick search: <input type="text" name="q" id="quick-search-input" value=""><input type="button" onclick="location='Search.aspx?terms='+document.getElementById('quick-search-input').value;" value="Go">
    </div>
    <asp:Repeater ID="MessageRepeater" OnItemDataBound="MessageRepeater_ItemDataBound" runat="server">
        <ItemTemplate>
            <cc:MessageView ID="MessageView" Message="<%# Container.DataItem %>" runat="server" />
        </ItemTemplate>
    </asp:Repeater>
    <div id="bottom-extra">
        <asp:ImageButton ID="AddBookmarkImageButton" OnClick="AddBookmarkImageButton_Click" AlternateText="TODO" ImageUrl="~/Templates/Default/Images/Icons/add-bookmark.gif" runat="server" />
    </div>
    
    <cc:Pager ID="BottomPager" runat="server" />

    <asp:PlaceHolder ID="QuickReplyPlaceHolder" runat="server">
        <input type="button" id="quick-reply-toggle" onclick="toggleQuickReply();" value="<%= GetLocalResourceObject("QuickReplyToggleButton") %>" />
    
        <div id="quick-reply-container">
            <h2><%= GetLocalResourceObject("QuickReplyTitle") %></h2>
            <asp:TextBox ID="QuickReplyText" TextMode="MultiLine" Width="500" Height="75" runat="server" />
            <asp:Button ID="QuickReplyButton" OnClick="QuickReplyButton_Click" Text="<%$ Resources: QuickReplyAddButton %>" runat="server" />
        </div>
        
        <script type="text/javascript" src="JavaScript/extendedOptionContainer.js"></script>
        <script type="text/javascript">
        
            var container = new ExtendedOptionContainer(document.getElementById('quick-reply-container'));

            function toggleQuickReply()
            {
                container.setDisplay(!container.isVisible());
                document.getElementById('quick-reply-toggle').style.display = 'none';
            }
            
        </script>
    </asp:PlaceHolder>
</asp:Content>
